package com.hotel.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hotel.entity.Member;
import com.hotel.dto.MemberDTO;
import com.hotel.vo.MemberVO;

import java.util.List;
import java.util.Map;

/**
 * 会员服务接口
 */
public interface MemberService extends IService<Member> {
    
    /**
     * 分页查询会员列表
     */
    Page<MemberVO> getMemberPage(int current, int size, String keyword, String level, Integer status);
    
    /**
     * 根据ID获取会员详情
     */
    MemberVO getMemberById(Long id);
    
    /**
     * 创建会员
     */
    boolean createMember(MemberDTO memberDTO);
    
    /**
     * 更新会员信息
     */
    boolean updateMember(Long id, MemberDTO memberDTO);
    
    /**
     * 删除会员
     */
    boolean deleteMember(Long id);
    
    /**
     * 根据手机号查询会员
     */
    Member getMemberByPhone(String phone);
    
    /**
     * 根据会员号查询会员
     */
    Member getMemberByMemberNo(String memberNo);
    
    /**
     * 更新会员积分
     */
    boolean updateMemberPoints(Long memberId, Integer points, String source, String description);
    
    /**
     * 升级会员等级
     */
    boolean upgradeMemberLevel(Long memberId, String newLevel);
    
    /**
     * 冻结/解冻会员
     */
    boolean updateMemberStatus(Long memberId, Integer status);
    
    /**
     * 获取会员统计数据
     */
    Map<String, Object> getMemberStats();
    
    /**
     * 获取会员等级分布
     */
    List<Map<String, Object>> getMemberLevelDistribution();
    
    /**
     * 获取会员增长趋势
     */
    List<Map<String, Object>> getMemberGrowthTrend(String type);
    
    /**
     * 批量操作会员
     */
    boolean batchOperation(List<Long> memberIds, String operation, Object params);
    
    /**
     * 导出会员数据
     */
    void exportMemberData(String level, Integer status);
}